﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CXJ.WindowsForms.Demo
{
    public partial class tbCartoonForm : Form
    {
        private BLL.Demo.tbCartoon _BaseBLL = new CXJ.BLL.Demo.tbCartoon();


        public tbCartoonForm()
        {
            InitializeComponent();
        }

        private void tbCartoonForm_Load(object sender, EventArgs e)
        {
            BindData();
        }
        public void BindData()
        {
            _BaseBLL.Select(this, this.dataGridView1);
        }

        private void button_select_Click(object sender, EventArgs e)
        {
            _BaseBLL.Select(this, this.dataGridView1);
        }

        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (dataGridView1.CurrentRow == null) return;
            CXJ.Interface.IBaseEntity entity = (CXJ.Interface.IBaseEntity)_BaseBLL.X_BaseEntity.Clone();
            entity.PK_VALUE = dataGridView1.CurrentRow.Cells[entity.PK].Value.ToString();
            IList<CXJ.Interface.IBaseEntity> entityList = new List<CXJ.Interface.IBaseEntity>();
            entityList = _BaseBLL.X_DataOperater.GetEntityList(entity);

        }
    }
}
